import org.jopas.*;
public class Example3 {
/**
* The constructor of the class have to start joPAS to run Octave because
* Octave program takes a long time to start
*/
public Example3() {
Jopas jopas = new Jopas(); //joPAS inicialitation
double[] aA= {1,2,3,4};
Matrix mA= new Matrix (aA,"vA");
jopas.Load(mA);
double[] aB= {5,3,8,1};
Matrix mB= new Matrix (aB,"vB");
jopas.Load(mB);
jopas.Execute("vY=vA+vB");
Matrix mY = jopas.Save("vY");
String smY = mY.toString();
System.out.println(smY);
System.exit(0);
}
public static void main(String av[]) {
Example3 example3 = new Example3();
}
} |